package edu.zut.cn.enums;


/**
 *  操作状态码
 *
 * @author 张小訫
 */
public enum CodeEnum {

    SUCCESS(0,"操作成功"),
    FAIL(-1,"操作失败"),
    LOGIN_SUCCESS(0,"登录成功"),
    LOGIN_ERROR(-1,"登录失败"),
    NEED_LOGIN(-1,"需要登录"),
    SYSTEM_ERROR(-1,"系统错误"),
    NO_OPERATOR(-1,"没有权限"),
    ;

    int code;
    String msg;

    CodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
